import { Module } from '@nestjs/common';
import { UserModule } from 'src/modules/user/user.module';
import { DatabaseModule } from './database/index';
import { RedisModule } from './database/redis';
import { JwtModule } from '@nestjs/jwt';
import { ExpTime } from './const';
import { TrackModule } from 'src/modules/track/track.module';
import { UploadModule } from './modules/upload/upload.module';
import { ScheduleModule } from '@nestjs/schedule';

@Module({
  imports: [
    JwtModule.register({
      global: true,
      secret: 'wjnxixi',
      signOptions: { expiresIn: `${ExpTime}s` },
    }),
    UserModule,
    DatabaseModule,
    RedisModule,
    TrackModule,
    UploadModule,
    ScheduleModule.forRoot(),
  ],
  controllers: [],
  providers: [],
})
export class AppModule {}
